This invention relates to the field of computer systems. More particularly, a method and apparatus are provided for dynamic, hardware-based arbitration.
Arbitration is employed in computer systems to facilitate fair access to a shared resource among competing consumers. For example, a memory controller may employ arbitration to allow access to shared memory. Or, a network interface (e.g., a network interface circuit or card) may arbitrate between multiple communication streams to enable access to a communication link.
Existing arbitration algorithms, such as round robin and deficit round robin, generally employ fixed arbitration weights or a fixed number of credits. Other arbitration schemes may employ programmable arbitration weights, but rely upon software to monitor the arbitration process, determine when a weight needs to be changed and alter the weight accordingly.
However, the speed of memory access, packet transmission and other resource accesses has increased dramatically since existing arbitration schemes were first put into use. In some circumstances, software simply cannot act fast enough to measure the demands of clients competing for a common resource and assign different arbitration weights. More generally, the software cannot operate fast enough to adjust the arbitration scheme or weights in accordance with the clients' temporal behavior.
For example, the software latency involved in measuring the memory bandwidth needs of multiple clients may be very large in comparison to the duration of a time period during which one or more of the clients' demands experience sharp decreases or increases. The inability of software to keep pace with the clients' behavior can result in consequences such as dropped packets, inefficient memory usage or allocation, and so on.